<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <!-- 
     创建实例 - 初始化渲染 
      1. 准备容器
      2. 引包-官网 开发版本 - 错误提示更完善
      3. 创建vue实例
      4. 指定配置项
         el 指定挂载点
         data 提供数据
   -->
    <div class="box">
        <div id="app">
            <ul v-for="item in people">
            <li>{{item}}</li>
            </ul>
            <div class="button" @click="change">走一走</div>
        </div>
    </div>
    <script src="./vue.js"></script>
    <script>
        const app = new Vue({
            el: '#app',
            data: {
                people:['帅哥','美女','程序猿']
            },
            methods:{
              change(){
                this.people=this.people.reverse()
              }
            }
        })
    </script>
</body>
<style>
    .box {
        width: 300px;
        height: 200px;
        border: 1px solid #000;

        .button{
           width:60px;
           height: 30px;
           background-color: red;
           margin-left: 10px;
           text-align: center;
        }

    }
</style>

</html>